package com.zpark.jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

/**
 * @PackageName: com.zpark.jsoup
 * @ClassName: JsoupPrintMetadata
 * @Description:
 * @author: RZS
 * @date: 2021/8/16  9:55
 */
public class JsoupPrintMetadata {
    public static void main( String[] args ) throws IOException {
        Document doc = Jsoup.connect("https://y.qq.com").get();

        String keywords = doc.select("meta[name=keywords]").first().attr("content");
        System.out.println("Meta keyword : " + keywords);
        String description = doc.select("meta[name=description]").get(0).attr("content");
        System.out.println("Meta description : " + description);
    }
}
